package org.eiahe.hr.attendance.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.core.xss.Xss;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.attendance.domain.AnnualLeave;

import java.math.BigDecimal;

/**
 * 年假核算业务对象 hr_annual_leave
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = AnnualLeave.class, reverseConvertGenerate = false)
public class AnnualLeaveBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 工号
     */
    @NotBlank(message = "工号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String employeeNo;

    private String employeeName;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 年份
     */
    @NotNull(message = "年份不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer year;

    /**
     * 工龄(年)
     */
    private Integer workYears;

    /**
     * 总天数
     */
    private Integer totalDays;

    /**
     * 已用天数
     */
    private BigDecimal usedDays;

    /**
     * 剩余天数
     */
    private BigDecimal remainingDays;

    /**
     * 状态(0正常 1停用)
     */
    private String status;

    /**
     * 备注
     */
    @Xss(message = "备注不能包含脚本字符")
    private String remark;
}
